<!DOCTYPE html>
<html th:replace="~{layout :: layout(~{::title}, ~{::section})}">
<head>
<title>角色编辑页面</title>

</head>
<body>
	<section>
		<link th:href="@{/zui/lib/uploader/zui.uploader.min.css}"
			rel="stylesheet">
		<form th:action="@{/admin/role/edit}" method="post" th:object="${role}">
			<input type="hidden" name="id" th:value="${role?.id}">
			<div class="row">
				<div class="col-xs-2"
					style="height: 35px; display: flex; justify-content: flex-end; line-height: 35px">
					角色名称</div>
				<div class="col-xs-6">
					<input class="form-control" type="text" placeholder="请输入角色名称"
						   	name="roleName" th:value="${role?.roleName}">
				</div>
				<div class="col-xs-4" th:if="${#fields.hasErrors('roleName')}" th:errors="*{roleName}" th:style="'color:red'">

				</div>
			</div>
			<div class="row">
				<div class="col-xs-2"
					 style="height: 35px; display: flex; justify-content: flex-end; line-height: 35px">
					状态</div>
				<div class="col-xs-6" style="display: flex;">
					<select class="form-control" name="status" th:value="${role.status}">
						<option th:selected="${role.status==0}" value="0">未激活</option>
						<option th:selected="${role.status==1}" value="1">激活</option>
					</select>

				</div>
				<div class="col-xs-4"></div>
			</div>
			<div class="row">
				<div class="col-xs-2"
					style="height: 35px; display: flex; justify-content: flex-end; line-height: 35px">
					角色介绍</div>
				<div class="col-xs-6">
					<textarea id="decription" name="description"
						class="form-control" th:text="${role?.description}"></textarea>
				</div>
                <div class="col-xs-4">


				</div>
			</div>

			<div class="row">
				<div class="col-xs-2"
					style="height: 35px; display: flex; justify-content: flex-end; line-height: 35px">
					</div>
				<div class="col-xs-6">
					<button class="btn btn-primary btn-block" type="submit">保存</button>
				</div>
				<div class="col-xs-4"></div>
			</div>

		</form>
	</section>
</body>
</html>